@import "./pure/base-min.less";
@import "./pure/buttons-min.less";
@import "./pure/forms-min.less";
@import "./fontello.less";

.ea-json-editor {
  padding: 12px 6px;
  border: 1px solid #E5E5E5;

  p {
    margin: 0;
  }

  ol,
  ul {
    margin: 0;
  }

  .block {
    position: relative;
    display: block;
    line-height: 30px;
  }

  .block.hide-block {
    background: #f5f5f5;

    .json-val {
      display: none;
    }

    .collapse-down {
      transform: rotate(-90deg);
    }
  }

  .tools {
    position: absolute;
    right: 0;
    top: 0;
    height: 30px;
  }

  .tools-types {
    position: relative;
    right: 20px;
    border: none;
    background-color: #EDEDED;
    color: #8E8E8E;
  }

  .del-btn {
    cursor: pointer;
    transition: opacity .4s ease;

    &:hover {
      opacity: .6;
    }
  }

  .dragbar {
    position: absolute;
    top: 0;
    right: 20px;
    bottom: 0;
    width: 5px;
    font-size: 18px;
    margin-right: 15px;
    cursor: pointer;
  }

  .des {
    position: absolute;
    right: 14px;
    font-size: 10px;
    line-height: 30px;
    color: #6190e8;
    cursor: pointer;
  }

  .add-des {
    color: #999;
  }

  .block_content {
    text-align: left;
    line-height: 1.5 !important;

    .block_content {
      margin-left: 20px;
    }

    .i-type {
      color: #999;
    }

    .key-input,
    .val-input {
      width: 100px;
      border: none;
      height: 25px;
      padding: 0 5px;
      font-weight: bold;
      font-size: 14px;
      background: rgba(0, 0, 0, 0);

      &:focus {
        background: #ffffa0;
        border: none;
        outline: 0;
      }
    }

    .val-input {
      font-weight: normal;
      color: #5082FF;
    }

    .des-input {
      display: inline-block;
      width: 60px;
      border: none;
      background-color: #E2F7D9;
      color: #74be74;
      text-align: center;

      &:focus {
        outline: none;
      }
    }
  }

  .block_content .json-key {
    font-weight: bold;

    &.json-desc {
      color: #999;
      font-size: .8em;
    }
  }

  .collopsed:before {
    content: '';
    display: inline-block;
    height: 10px;
    width: 10px;
    background: #333;
  }

  .collapse-down {
    float: left;
    color: #000;
    cursor: pointer;
    transition: transform .2s ease;
  }

  .add-key {
    display: inline-block;
    padding-left: 2px;
    padding-right: 2px;
    margin-bottom: 10px;
    font-size: .8em;
    line-height: 1em;
    cursor: pointer;
  }

  .array-ol {
    padding-left: 20px !important;
  }

  .array-item {
    position: relative;

    &.hide-item {
      background: #f5f5f5;

      .json-val {
        display: none;
      }

      .collapse-down {
        transform: rotate(-90deg);
        transition: transform .4s ease;
      }
    }
  }

}
